{include file='common/_meta' /}

<body>
<div class="container">
	<div class="layui-row">
        <div class="layui-col-md12 breadcrumb">
    		<span class="layui-breadcrumb">
                <a><cite>审核管理</cite></a>
                <a><cite>短信审核列表</cite></a>
    		</span>
        </div>
    </div>

    <div class="layui-row">

    	<form class="layui-form" action="" lay-filter="" style="padding-top: 15px;" id="search-form">
            <div class="layui-col-sm6 layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label">时间选择：</label>
                    <div class="layui-input-block">
                        <input type="text" name="st" autocomplete="off" placeholder="" class="layui-input" id="st">
                    </div>
                </div>
            </div>

    		<div class="layui-col-sm4">
				<div class="layui-input-block">
			      	<button class="layui-btn custom-sm-fluid" id="search" lay-submit lay-filter="custom-search">搜索</button>
			    </div>
    		</div>

    	</form>

    </div>



	<div class="layui-col-md12">

		<table class="layui-hide" id="initdate" lay-filter="datatable"></table>

        <script type="text/html" id="barDemo">
            <a class="layui-btn layui-btn-xs" lay-event="review"><i class="layui-icon layui-icon-edit"></i></a>
        </script>

	</div>

</div>
{include file="common/_footer"}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">

layui.use(['table','laydate','form','layer'], function() {

	var table = layui.table;
	var layer = layui.layer;
	var form  = layui.form;
    var laydate = layui.laydate;

    var st = '{:date('Y-m-d')}';

    //绑定时间插件
    laydate.render({
        elem: '#st'
        ,type: 'date'
        ,value: '{:date('Y-m-d')}'
    });


    var tableIns = table.render({
        id: 'datatable'
        ,elem: '#initdate'
        ,url:'{:url('SmsReview/reviewlist')}'
        ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
        ,toolbar: '#toolbarDemo'//默认工具栏
        ,defaultToolbar: []
        ,data:[]
        ,method:'get'//请求方式
        ,where: {api: 1,st:$('#st').val(),cid:$('#cid').val()}
        ,page:true//开启分页
        ,limit:15//每页记录数
        ,limits: [15,20,30,40,50,60,70,80,90]
        ,cols: [[
            // {type:'checkbox', title: '选择'}
            {type:'numbers', title: '序号'}
            ,{field:'company_name', title: '渠道',align: 'center'}
            ,{field:'status', title: '状态', align: 'center'}
            ,{field:'order_all', title: '订单总数',align: 'center'}
            ,{field:'phone_size', title: '号码总数',align: 'center'}
        ]]
    });

  	// 监听搜索事件
    form.on('submit(custom-search)', function(data) {

      	tableIns.reload({
            url:'{:url('SmsReview/reviewlist')}'
        	,where: {phone_type: data.field.phone_type ,api: 1,cid: data.field.cid,st:data.field.st,create_time:data.field.create_time,end_time:data.field.end_time}
        	,page: {curr: 1}
      	});
        //重新赋值时间
        st = data.field.st;
        // console.log(st);
        $(window).resize()

      	return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
    });

});


</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
